<?php
/**
 * @file name : introduction.php
 * @package   : thokim
 * @author    : Vo Thanh Minh
 * @email     : <thanhminhld@yahoo.com - thanhminhld@gmail.com>
 * @copyright : 2011
 *
 */
if (!defined('BASEPATH')) {
    exit('No direct script access');
}

class Introduction extends Base_Controller
{
    /**
     * __construct
     * @access public
     * @param
     * @return
     */
    public function __construct()
    {
        parent::__construct();
    }
    /**
     * @function index
     * @access     private
     * @param
     * @return
     */
    public function index()
    {
        $controlName  = $this->uri->segment(1);
        /**
         * Config for paging
         */
        $arrWhere = array('lang_id'   => $this->lang_default);
        /**
         * Load parent category list
         */
        $modulesList = $this->introduction_model->loadList($arrWhere, 1, 0, 'intro_id', 'DESC');
        $moduleObj = array();
        if (count($modulesList) > 0) {
            $moduleObj = $modulesList[0];
        }
        $data = array('urlControlName'  => '?c=' . $controlName,
                      'moduleObj'       => $moduleObj);
        $this->msmarty->assignArrVal($data);
        $main = $this->msmarty->fetch($controlName . '/introduction.tpl');
        $this->msmarty->assign('main', $main);
        $this->msmarty->view();
    }
}
?>
